
import { RouteRecordRaw} from "vue-router";


//基础的路由
const routes= [
         {
         
         name:"home",
         path:"/",
         component:()=>import("@/views/home.vue"), //懒加载
      },
      {
         name:'auth.login',
         path:'/login',
         component:()=>import("@/views/auth/login.vue"),
         meta:{guest:true},//只能游客登录
        },
      //   {
      //    name:'article',
      //    path:'/article',
      //    component:()=>import("@/views/article.old"),
       
      //   },
        {
         name:'auth.register',
         path:'/register',
         component:()=>import("@/views/auth/register.vue"),
         meta:{guest:true},
        },
        {
         name:"class",
         path:'/class',
         component:()=>import("@/views/class/class.vue")
        },
        {
         name:'notFound',
         path:'/:any(.*)',
         component:()=>import("@/views/errors/404.vue"),
       
        }
        
     

   ] as RouteRecordRaw[]  //断言


export default routes